<template>
    <div class="newinform">
        <pagetitle type="2"></pagetitle>
        <el-card>
            <div class="title">系统消息 / 创建系统消息</div>
            <el-form :model="form" label-width="90px">
                <el-form-item label="*接收对象：">
                    <!-- <el-input v-model="form.name" class="inputs" /> -->
                    <el-select v-model="form.region" class="inputs" placeholder="请选择接收对象">
                        <el-option label="Zone one" value="shanghai" />
                        <el-option label="Zone two" value="beijing" />
                    </el-select>
                </el-form-item>
                <el-form-item label="*广告管理：">
                    <div class="advertising">
                        <div>
                            <el-form-item label="*图片：">
                                <uploadFile
                                    :fileUrl="form.cardHold"
                                    @callBack="uploadFiles"
                                    tableItem="cardHold"
                                    width="80px"
                                    height="80px"
                                    bottom="0"
                                    iconSize="24"
                                    :showText="false"
                                ></uploadFile>
                            </el-form-item>
                        </div>
                        <div>
                            <el-form-item label="*标题：">
                                <el-input v-model="form.name" class="inputs1" placeholder="请输入标题" />
                            </el-form-item>
                            <el-form-item label="*分类：">
                                <el-select v-model="form.region" class="inputs1" placeholder="请选择分类">
                                    <el-option label="Zone one" value="shanghai" />
                                    <el-option label="Zone two" value="beijing" />
                                </el-select>
                            </el-form-item>
                        </div>
                    </div>
                </el-form-item>
                <el-form-item label="*消息内容：">
                    <editor class="inputs" />
                </el-form-item>
                <el-form-item>
                    <el-button type="primary" @click="router.back()">返回</el-button>
                    <el-button type="primary">保存</el-button>
                    <el-button type="primary">发布</el-button>
                </el-form-item>
            </el-form>
        </el-card>
    </div>
</template>
<script lang="ts" setup>
import editor from "../components/editor.vue";
import { ref, reactive } from "vue";
import { useRouter } from "vue-router";
const form: any = reactive({});
const typeIndex = ref(0);
const selectType = (i: number) => {
    typeIndex.value = i;
};
const content = ref("");
const router = useRouter();
const pageData: any = ref([]);
const uploadFiles = (a: any, b: any) => {};
let input3 = ref(false);

let addsubjectForm: any = ref({});
const changeInput = (params: any) => {
    (addsubjectForm.value as any).questionTitle = params;
};
</script>
<style lang="scss" scoped>
.newinform {
    .title {
        color: #000000;
        font-weight: 500;
        font-size: 14px;
        margin-bottom: 25px;
    }
    .inputs {
        width: 980px;
    }
    .advertising {
        // width: 980px;
        height: 115px;
        border-radius: 5px;
        border: 1px solid #dcdfe6;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-right: 20px;
        .inputs1 {
            width: 700px;
        }
    }
}
</style>
<style>
.newinform .el-form-item .el-form-item {
    margin: 10px 0;
}
</style>
